package cn.hwm.proxy.rpcdemo;

import java.io.IOException;

public class ServiceTest {

    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                RpcFrameService rpcFrameService = new RpcFrameService(5050);
                rpcFrameService.registerService(DepotService.class, DepotServiceImpl.class);
                rpcFrameService.registerService(SendMail.class, SendMailImpl.class);

                try {
                    rpcFrameService.startService();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }).start();
    }

}
